/******************************************************************************
 * @brief: sys file
 * @Author:   aple
 * @Date: 2022-12-07 20:37:48
 * @LastEditors: aple
 * @LastEditTime: 2022-12-10 18:33:16
 * @Verision: 1.0.0.0
 ******************************************************************************/
#ifndef _SYS_FIL_H_H_
#define _SYS_FIL_H_H_

//------------------------------------------------------------------------------
//-------------------------------    管理    -----------------------------------
//------------------------------------------------------------------------------
#define FIL_OPEN_R 1  // 只读，没有则打开失败
#define FIL_OPEN_W 2  // 只写，没有则新建
#define FIL_OPEN_WA 4 // 只写，始终新建
	
/* file opt */
uint16_t sys_file_open(const char *file_name, uint8_t mode);
uint16_t sys_file_read(void *buff, uint16_t len);
uint16_t sys_file_write(void *buff, uint16_t len);
uint32_t sys_file_seek(uint32_t site);
uint32_t sys_file_size_get(void);
uint16_t sys_file_close(void);
uint16_t sys_file_dir_open(const char *path);

//------------------------------------------------------------------------------
//------------------------------- END DEFINE -----------------------------------
//------------------------------------------------------------------------------

#endif /* _SYS_FIL_H_H_ */
